home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / pretty5.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  18.6 KB  |  719 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "pretty.h"
  9. void r686clear_all(T686 C,int a1){
  10. int _i=0;
  11. int _v=0;
  12. _i=a1;
  13. while (!((_i)<(0))) {
  14. (C)[_i]=(_v);
  15. _i=(_i)-(1);
  16. }
  17. }
  18. void r686set_all_with(T686 C,int a1,int a2){
  19. int _i=0;
  20. _i=a2;
  21. while (!((_i)<(0))) {
  22. (C)[_i]=(a1);
  23. _i=(_i)-(1);
  24. }
  25. }
  26. int r686fast_index_of(T686 C,int a1,int a2){
  27. int R=0;
  28. while (!(((R)>(a2))||((a1)==((C)[R])))) {
  29. R=(R)+(1);
  30. }
  31. return R;
  32. }
  33. void r686copy_from(T686 C,T686 a1,int a2){
  34. int _i=0;
  35. _i=a2;
  36. while (!((_i)<(0))) {
  37. (C)[_i]=((a1)[_i]);
  38. _i=(_i)-(1);
  39. }
  40. }
  41. T686 r686realloc(T686 C,int a1,int a2){
  42. T686 R=NULL;
  43. R=calloc(a2,sizeof(int));
  44. r686copy_from(R,C,(a1)-(1));
  45. return R;
  46. }
  47. void r44copy_from(T44 C,T44 a1,int a2){
  48. int _i=0;
  49. _i=a2;
  50. while (!((_i)<(0))) {
  51. (C)[_i]=((a1)[_i]);
  52. _i=(_i)-(1);
  53. }
  54. }
  55. T44 r44realloc(T44 C,int a1,int a2){
  56. T44 R=NULL;
  57. R=calloc(a2,sizeof(T0*));
  58. r44copy_from(R,C,(a1)-(1));
  59. return R;
  60. }
  61. void r191copy_from(T191 C,T191 a1,int a2){
  62. int _i=0;
  63. _i=a2;
  64. while (!((_i)<(0))) {
  65. (C)[_i]=((a1)[_i]);
  66. _i=(_i)-(1);
  67. }
  68. }
  69. T191 r191realloc(T191 C,int a1,int a2){
  70. T191 R=NULL;
  71. R=calloc(a2,sizeof(T0*));
  72. r191copy_from(R,C,(a1)-(1));
  73. return R;
  74. }
  75. void r7add_first(T7* C,char a1){
  76. int _i=0;
  77. r7extend(C,'\40');
  78. _i=(((T7*)C))->_count/*4*/;
  79. while (!((_i)==(1))) {
  80. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((_i)-(1))-(1)]/*)*/);
  81. /*]*/
  82. _i=(_i)-(1);
  83. }
  84. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(1)-(1)]=(a1);
  85. /*]*/
  86. }
  87. void r7extend(T7* C,char a1){
  88. int _new_capacity=0;
  89. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  90. }
  91.  else if (((((T7*)C))->_capacity/*8*/)==(0)) {
  92. C->_capacity=32;
  93. C->_storage=calloc((((T7*)C))->_capacity/*8*/,sizeof(char));
  94. }
  95. else {
  96. _new_capacity=(2)*((((T7*)C))->_capacity/*8*/);
  97. C->_storage=r9realloc((((T7*)C))->_storage/*0*/,(((T7*)C))->_capacity/*8*/,_new_capacity);
  98. C->_capacity=_new_capacity;
  99. }
  100. /*FI*/C->_count=((((T7*)C))->_count/*4*/)+(1);
  101. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=(a1);
  102. /*]*/
  103. }
  104. void r7set_last(T7* C,char a1){
  105. /*IF*/if ((((((T7*)C))->_count/*4*/)==(0))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=(a1))) {
  106. r7extend(C,a1);
  107. }
  108. /*FI*/}
  109. /*No:STRING.remove_suffix*/
  110. void r7to_lower(T7* C){
  111. int _i=0;
  112. _i=(((T7*)C))->_count/*4*/;
  113. while (!((_i)==(0))) {
  114. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_lower(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  115. /*]*/
  116. _i=(_i)-(1);
  117. }
  118. }
  119. int r7hash_code(T7* C){
  120. int R=0;
  121. R=r9hashcode((((T7*)C))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  122. return R;
  123. }
  124. /*No:STRING.empty*/
  125. int r7index_of_string(T7* C,T0* a1){
  126. int R=0;
  127. int _i3=0;
  128. int _i2=0;
  129. int _i1=0;
  130. int _stop=0;
  131. _i1=1;
  132. _i2=(((T7*)((T7*)a1)))->_count/*4*/;
  133. _i3=_i2;
  134. while (!((R)!=(0))) {
  135. /*IF*/if ((_i2)>((((T7*)C))->_count/*4*/)) {
  136. R=((((T7*)C))->_count/*4*/)+(1);
  137. }
  138. else {
  139. _stop=0;
  140. while (!(_stop)) {
  141. /*IF*/if ((_i3)==(0)) {
  142. _stop=1;
  143. R=_i1;
  144. }
  145.  else if ((/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i3)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i2)-(1)]/*)*/)) {
  146. _stop=1;
  147. }
  148. /*FI*/_i3=(_i3)-(1);
  149. _i2=(_i2)-(1);
  150. }
  151. }
  152. /*FI*/_i1=(_i1)+(1);
  153. _i3=(((T7*)((T7*)a1)))->_count/*4*/;
  154. _i2=((_i1)+(_i3))-(1);
  155. }
  156. return R;
  157. }
  158. void r7make(T7* C,int a1){
  159. /*IF*/if ((a1)>(0)) {
  160. /*IF*/if (((((T7*)C))->_capacity/*8*/)<(a1)) {
  161. C->_storage=calloc(a1,sizeof(char));
  162. C->_capacity=a1;
  163. }
  164. /*FI*/}
  165. /*FI*/C->_count=0;
  166. }
  167. void* r7to_external(T7* C){
  168. void* R=0;
  169. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  170. C->_count=((((T7*)C))->_count/*4*/)+(1);
  171. /*IF*/if ((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=('\0')) {
  172. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=('\0');
  173. /*]*/
  174. }
  175. /*FI*/}
  176. else {
  177. r7extend(C,'\0');
  178. }
  179. /*FI*/C->_count=((((T7*)C))->_count/*4*/)-(1);
  180. R=((void*)(((T7*)C))->_storage/*0*/);
  181. return R;
  182. }
  183. /*No:STRING.item*/
  184. int r7has_string(T7* C,T0* a1){
  185. int R=0;
  186. R=(r7index_of_string(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  187. return R;
  188. }
  189. /*No:STRING.clear*/
  190. /*No:STRING.storage*/
  191. T0* r7twin(T7* C){
  192. T0* R=NULL;
  193. R=malloc(sizeof(*C));
  194. *((T7*)R)=M7;
  195. r7copy(((T7*)R),((T0*)C));
  196. return R;
  197. }
  198. int r7is_equal(T7* C,T0* a1){
  199. int R=0;
  200. /*IF*/if ((C)==((void*)(a1))) {
  201. R=1;
  202. }
  203.  else if (((((T7*)C))->_count/*4*/)==((((T7*)((T7*)a1)))->_count/*4*/)) {
  204. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  205. R=r9fast_memcmp((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,(((T7*)C))->_count/*4*/);
  206. }
  207. else {
  208. R=1;
  209. }
  210. /*FI*/}
  211. /*FI*/return R;
  212. }
  213. void r7swap(T7* C,int a1,int a2){
  214. char _tmp=0;
  215. _tmp=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]/*)*/;
  216. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]/*)*/);
  217. /*]*/
  218. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]=(_tmp);
  219. /*]*/
  220. }
  221. void r7blank(T7* C,int a1){
  222. r7make(C,a1);
  223. C->_count=a1;
  224. /*[IRF3.6fill_with*/{T7* C1=C;
  225. char b1='\40';
  226. r9set_all_with((((T7*)C1))->_storage/*0*/,b1,((((T7*)C1))->_count/*4*/)-(1));
  227. }/*]*/
  228. }
  229. char r7last(T7* C){
  230. char R=0;
  231. R=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/;
  232. return R;
  233. }
  234. /*No:STRING.capacity*/
  235. int r7has_suffix(T7* C,T0* a1){
  236. int R=0;
  237. int _i2=0;
  238. int _i1=0;
  239. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)<=((((T7*)C))->_count/*4*/)) {
  240. _i1=(((((T7*)C))->_count/*4*/)-((((T7*)((T7*)a1)))->_count/*4*/))+(1);
  241. _i2=1;
  242. while (!((((_i1)>((((T7*)C))->_count/*4*/))||((_i2)>((((T7*)((T7*)a1)))->_count/*4*/)))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i1)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i2)-(1)]/*)*/)))) {
  243. _i1=(_i1)+(1);
  244. _i2=(_i2)+(1);
  245. }
  246. R=(_i1)>((((T7*)C))->_count/*4*/);
  247. }
  248. /*FI*/return R;
  249. }
  250. int r7has(T7* C,char a1){
  251. int R=0;
  252. R=(r7index_of(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  253. return R;
  254. }
  255. void r7copy(T7* C,T0* a1){
  256. C->_count=(((T7*)((T7*)a1)))->_count/*4*/;
  257. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  258. /*IF*/if (((((T7*)C))->_capacity/*8*/)<((((T7*)C))->_count/*4*/)) {
  259. C->_storage=calloc((((T7*)C))->_count/*4*/,sizeof(char));
  260. C->_capacity=(((T7*)C))->_count/*4*/;
  261. }
  262. /*FI*/r9copy_from((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  263. }
  264. /*FI*/}
  265. int r7same_as(T7* C,T0* a1){
  266. int R=0;
  267. int _i=0;
  268. /*IF*/if ((a1)==((void*)(C))) {
  269. R=1;
  270. }
  271. else {
  272. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)!=((((T7*)C))->_count/*4*/)) {
  273. }
  274. else {
  275. _i=(((T7*)C))->_count/*4*/;
  276. while (!(((_i)==(0))||(!(r3same_as(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/))))) {
  277. _i=(_i)-(1);
  278. }
  279. R=(_i)==(0);
  280. }
  281. /*FI*/}
  282. /*FI*/return R;
  283. }
  284. /*No:STRING.put*/
  285. void r7prepend(T7* C,T0* a1){
  286. int _old_count=0;
  287. int _i=0;
  288. _old_count=(((T7*)C))->_count/*4*/;
  289. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  290. while (!((_i)==(0))) {
  291. r7extend(C,'\40');
  292. _i=(_i)-(1);
  293. }
  294. _i=(((T7*)C))->_count/*4*/;
  295. while (!((_old_count)==(0))) {
  296. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_old_count)-(1)]/*)*/);
  297. /*]*/
  298. _i=(_i)-(1);
  299. _old_count=(_old_count)-(1);
  300. }
  301. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  302. while (!((_i)==(0))) {
  303. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  304. /*]*/
  305. _i=(_i)-(1);
  306. }
  307. }
  308. /*No:STRING.fill_with*/
  309. /*No:STRING.count*/
  310. void r7to_upper(T7* C){
  311. int _i=0;
  312. _i=(((T7*)C))->_count/*4*/;
  313. while (!((_i)==(0))) {
  314. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_upper(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  315. /*]*/
  316. _i=(_i)-(1);
  317. }
  318. }
  319. void r7remove_last(T7* C,int a1){
  320. C->_count=((((T7*)C))->_count/*4*/)-(a1);
  321. }
  322. /*No:STRING.first*/
  323. int r7index_of(T7* C,char a1){
  324. int R=0;
  325. R=(1)+(r9fast_index_of((((T7*)C))->_storage/*0*/,a1,((((T7*)C))->_count/*4*/)-(1)));
  326. return R;
  327. }
  328. void r7append(T7* C,T0* a1){
  329. int _i=0;
  330. _i=1;
  331. while (!((_i)>((((T7*)((T7*)a1)))->_count/*4*/))) {
  332. r7extend(C,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  333. _i=(_i)+(1);
  334. }
  335. }
  336. /*No:ARRAY[INTEGER_CONSTANT].clear_all*/
  337. /*No:ARRAY[INTEGER_CONSTANT].set_all_with*/
  338. void r28make(T28* C,int a1,int a2){
  339. int _needed=0;
  340. C->_lower=a1;
  341. C->_upper=a2;
  342. _needed=((a2)-(a1))+(1);
  343. /*IF*/if ((_needed)>(0)) {
  344. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed)) {
  345. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  346. C->_storage=calloc(_needed,sizeof(T0*));
  347. }
  348. else {
  349. C->_storage=calloc(_needed,sizeof(T0*));
  350. }
  351. /*FI*/C->_capacity=_needed;
  352. }
  353. else {
  354. /*[IRF3.6clear_all*/{T28* C1=C;
  355. T0* __value=NULL;
  356. /*[IRF3.6set_all_with*/{T28* C2=C1;
  357. T0* c1=__value;
  358. r392set_all_with((((T28*)C2))->_storage/*4*/,c1,((((T28*)C2))->_upper/*12*/)-((((T28*)C2))->_lower/*16*/));
  359. }/*]*/
  360. }/*]*/
  361. }
  362. /*FI*/}
  363. /*FI*/}
  364. T0* r28item(T28* C,int a1){
  365. T0* R=NULL;
  366. R=((((T28*)C))->_storage/*4*/)[(a1)-((((T28*)C))->_lower/*16*/)];
  367. return R;
  368. }
  369. /*No:ARRAY[INTEGER_CONSTANT].storage*/
  370. T0* r28twin(T28* C){
  371. T0* R=NULL;
  372. R=malloc(sizeof(*C));
  373. *((T28*)R)=M28;
  374. r28copy(((T28*)R),((T0*)C));
  375. return R;
  376. }
  377. /*No:ARRAY[INTEGER_CONSTANT].capacity*/
  378. void r28copy(T28* C,T0* a1){
  379. int _needed_capacity=0;
  380. C->_lower=(((T28*)((T28*)a1)))->_lower/*16*/;
  381. C->_upper=(((T28*)((T28*)a1)))->_upper/*12*/;
  382. _needed_capacity=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  383. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed_capacity)) {
  384. C->_capacity=_needed_capacity;
  385. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  386. }
  387. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  388. r392copy_from((((T28*)C))->_storage/*4*/,(((T28*)((T28*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  389. }
  390. /*FI*/}
  391. /*No:ARRAY[INTEGER_CONSTANT].lower*/
  392. /*No:ARRAY[INTEGER_CONSTANT].put*/
  393. /*No:ARRAY[INTEGER_CONSTANT].upper*/
  394. int r28count(T28* C){
  395. int R=0;
  396. R=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  397. return R;
  398. }
  399. void r28add_last(T28* C,T0* a1){
  400. int _new_capacity=0;
  401. /*IF*/if (((((T28*)C))->_capacity/*8*/)<((r28count(C))+(1))) {
  402. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  403. C->_capacity=16;
  404. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  405. }
  406. else {
  407. _new_capacity=(2)*((((T28*)C))->_capacity/*8*/);
  408. C->_storage=r392realloc((((T28*)C))->_storage/*4*/,(((T28*)C))->_capacity/*8*/,_new_capacity);
  409. C->_capacity=_new_capacity;
  410. }
  411. /*FI*/}
  412. /*FI*/C->_upper=((((T28*)C))->_upper/*12*/)+(1);
  413. /*[IRF3.6put*/{T28* C1=C;
  414. T0* b1=a1;
  415. int b2=(((T28*)C))->_upper/*12*/;
  416. ((((T28*)C1))->_storage/*4*/)[(b2)-((((T28*)C1))->_lower/*16*/)]=(b1);
  417. }/*]*/
  418. }
  419. T0* r28first(T28* C){
  420. T0* R=NULL;
  421. R=r28item(C,(((T28*)C))->_lower/*16*/);
  422. return R;
  423. }
  424. T0* r235item(T235* C,int a1){
  425. T0* R=NULL;
  426. R=((((T235*)C))->_storage/*0*/)[(a1)-((((T235*)C))->_lower/*12*/)];
  427. return R;
  428. }
  429. /*No:ARRAY[CREATION_CLAUSE].storage*/
  430. /*No:ARRAY[CREATION_CLAUSE].capacity*/
  431. /*No:ARRAY[CREATION_CLAUSE].lower*/
  432. /*No:ARRAY[CREATION_CLAUSE].put*/
  433. /*No:ARRAY[CREATION_CLAUSE].upper*/
  434. int r235count(T235* C){
  435. int R=0;
  436. R=(((((T235*)C))->_upper/*8*/)-((((T235*)C))->_lower/*12*/))+(1);
  437. return R;
  438. }
  439. void r235add_last(T235* C,T0* a1){
  440. int _new_capacity=0;
  441. /*IF*/if (((((T235*)C))->_capacity/*4*/)<((r235count(C))+(1))) {
  442. /*IF*/if (((((T235*)C))->_capacity/*4*/)==(0)) {
  443. C->_capacity=16;
  444. C->_storage=calloc((((T235*)C))->_capacity/*4*/,sizeof(T0*));
  445. }
  446. else {
  447. _new_capacity=(2)*((((T235*)C))->_capacity/*4*/);
  448. C->_storage=r513realloc((((T235*)C))->_storage/*0*/,(((T235*)C))->_capacity/*4*/,_new_capacity);
  449. C->_capacity=_new_capacity;
  450. }
  451. /*FI*/}
  452. /*FI*/C->_upper=((((T235*)C))->_upper/*8*/)+(1);
  453. /*[IRF3.6put*/{T235* C1=C;
  454. T0* b1=a1;
  455. int b2=(((T235*)C))->_upper/*8*/;
  456. ((((T235*)C1))->_storage/*0*/)[(b2)-((((T235*)C1))->_lower/*12*/)]=(b1);
  457. }/*]*/
  458. }
  459. T0* r235first(T235* C){
  460. T0* R=NULL;
  461. R=r235item(C,(((T235*)C))->_lower/*12*/);
  462. return R;
  463. }
  464. T0* r147item(T147* C,int a1){
  465. T0* R=NULL;
  466. R=((((T147*)C))->_storage/*0*/)[(a1)-((((T147*)C))->_lower/*12*/)];
  467. return R;
  468. }
  469. /*No:ARRAY[E_WHEN].storage*/
  470. T0* r147twin(T147* C){
  471. T0* R=NULL;
  472. R=malloc(sizeof(*C));
  473. *((T147*)R)=M147;
  474. r147copy(((T147*)R),((T0*)C));
  475. return R;
  476. }
  477. /*No:ARRAY[E_WHEN].capacity*/
  478. void r147copy(T147* C,T0* a1){
  479. int _needed_capacity=0;
  480. C->_lower=(((T147*)((T147*)a1)))->_lower/*12*/;
  481. C->_upper=(((T147*)((T147*)a1)))->_upper/*8*/;
  482. _needed_capacity=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  483. /*IF*/if (((((T147*)C))->_capacity/*4*/)<(_needed_capacity)) {
  484. C->_capacity=_needed_capacity;
  485. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  486. }
  487. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  488. r586copy_from((((T147*)C))->_storage/*0*/,(((T147*)((T147*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  489. }
  490. /*FI*/}
  491. /*No:ARRAY[E_WHEN].lower*/
  492. /*No:ARRAY[E_WHEN].put*/
  493. /*No:ARRAY[E_WHEN].upper*/
  494. int r147count(T147* C){
  495. int R=0;
  496. R=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  497. return R;
  498. }
  499. void r147add_last(T147* C,T0* a1){
  500. int _new_capacity=0;
  501. /*IF*/if (((((T147*)C))->_capacity/*4*/)<((r147count(C))+(1))) {
  502. /*IF*/if (((((T147*)C))->_capacity/*4*/)==(0)) {
  503. C->_capacity=16;
  504. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  505. }
  506. else {
  507. _new_capacity=(2)*((((T147*)C))->_capacity/*4*/);
  508. C->_storage=r586realloc((((T147*)C))->_storage/*0*/,(((T147*)C))->_capacity/*4*/,_new_capacity);
  509. C->_capacity=_new_capacity;
  510. }
  511. /*FI*/}
  512. /*FI*/C->_upper=((((T147*)C))->_upper/*8*/)+(1);
  513. /*[IRF3.6put*/{T147* C1=C;
  514. T0* b1=a1;
  515. int b2=(((T147*)C))->_upper/*8*/;
  516. ((((T147*)C1))->_storage/*0*/)[(b2)-((((T147*)C1))->_lower/*12*/)]=(b1);
  517. }/*]*/
  518. }
  519. /*No:ARRAY[RUN_FEATURE].clear_all*/
  520. /*No:ARRAY[RUN_FEATURE].set_all_with*/
  521. void r477force(T477* C,T0* a1,int a2){
  522. /*IF*/if (((((T477*)C))->_upper/*8*/)<(a2)) {
  523. r477resize(C,(((T477*)C))->_lower/*12*/,a2);
  524. }
  525.  else if ((a2)<((((T477*)C))->_lower/*12*/)) {
  526. r477resize(C,a2,(((T477*)C))->_upper/*8*/);
  527. }
  528. /*FI*//*[IRF3.6put*/{T477* C1=C;
  529. T0* b1=a1;
  530. int b2=a2;
  531. ((((T477*)C1))->_storage/*0*/)[(b2)-((((T477*)C1))->_lower/*12*/)]=(b1);
  532. }/*]*/
  533. }
  534. void r477make(T477* C,int a1,int a2){
  535. int _needed=0;
  536. C->_lower=a1;
  537. C->_upper=a2;
  538. _needed=((a2)-(a1))+(1);
  539. /*IF*/if ((_needed)>(0)) {
  540. /*IF*/if (((((T477*)C))->_capacity/*4*/)<(_needed)) {
  541. /*IF*/if (((((T477*)C))->_capacity/*4*/)==(0)) {
  542. C->_storage=calloc(_needed,sizeof(T0*));
  543. }
  544. else {
  545. C->_storage=calloc(_needed,sizeof(T0*));
  546. }
  547. /*FI*/C->_capacity=_needed;
  548. }
  549. else {
  550. /*[IRF3.6clear_all*/{T477* C1=C;
  551. T0* __value=NULL;
  552. /*[IRF3.6set_all_with*/{T477* C2=C1;
  553. T0* c1=__value;
  554. r778set_all_with((((T477*)C2))->_storage/*0*/,c1,((((T477*)C2))->_upper/*8*/)-((((T477*)C2))->_lower/*12*/));
  555. }/*]*/
  556. }/*]*/
  557. }
  558. /*FI*/}
  559. /*FI*/}
  560. T0* r477item(T477* C,int a1){
  561. T0* R=NULL;
  562. R=((((T477*)C))->_storage/*0*/)[(a1)-((((T477*)C))->_lower/*12*/)];
  563. return R;
  564. }
  565. void r477resize(T477* C,int a1,int a2){
  566. int _mem=0;
  567. int _up=0;
  568. int _i=0;
  569. T0* _other=NULL;
  570. {T477*n=malloc(sizeof(*n));
  571. *n=M477;
  572. r477make(n,a1,a2);
  573. _other=(T0*)n;
  574. }
  575. _i=r2max((((T477*)C))->_lower/*12*/,(((T477*)((T477*)_other)))->_lower/*12*/);
  576. _up=r2min((((T477*)C))->_upper/*8*/,(((T477*)((T477*)_other)))->_upper/*8*/);
  577. while (!((_i)>(_up))) {
  578. /*[IRF3.6put*/{T477* C1=((T477*)_other);
  579. T0* b1=r477item(C,_i);
  580. int b2=_i;
  581. ((((T477*)C1))->_storage/*0*/)[(b2)-((((T477*)C1))->_lower/*12*/)]=(b1);
  582. }/*]*/
  583. _i=(_i)+(1);
  584. }
  585. *((T477*)(C))=*((T477*)(_other));
  586. }
  587. /*No:ARRAY[RUN_FEATURE].storage*/
  588. /*No:ARRAY[RUN_FEATURE].capacity*/
  589. /*No:ARRAY[RUN_FEATURE].lower*/
  590. /*No:ARRAY[RUN_FEATURE].put*/
  591. /*No:ARRAY[RUN_FEATURE].upper*/
  592. int r477count(T477* C){
  593. int R=0;
  594. R=(((((T477*)C))->_upper/*8*/)-((((T477*)C))->_lower/*12*/))+(1);
  595. return R;
  596. }
  597. /*No:FIXED_ARRAY[TYPE_BIT_REF].storage*/
  598. /*No:FIXED_ARRAY[TYPE_BIT_REF].capacity*/
  599. void r41with_capacity(T41* C,int a1){
  600. /*IF*/if (((((T41*)C))->_capacity/*4*/)<(a1)) {
  601. C->_storage=calloc(a1,sizeof(T0*));
  602. C->_capacity=a1;
  603. }
  604. /*FI*/C->_upper=-(1);
  605. }
  606. /*No:FIXED_ARRAY[TYPE_BIT_REF].put*/
  607. /*No:FIXED_ARRAY[TYPE_BIT_REF].upper*/
  608. void r41add_last(T41* C,T0* a1){
  609. int _new_capacity=0;
  610. /*IF*/if ((((((T41*)C))->_upper/*8*/)+(1))<=(((((T41*)C))->_capacity/*4*/)-(1))) {
  611. C->_upper=((((T41*)C))->_upper/*8*/)+(1);
  612. }
  613.  else if (((((T41*)C))->_capacity/*4*/)==(0)) {
  614. C->_storage=calloc(2,sizeof(T0*));
  615. C->_capacity=2;
  616. C->_upper=0;
  617. }
  618. else {
  619. _new_capacity=(2)*((((T41*)C))->_capacity/*4*/);
  620. C->_storage=r539realloc((((T41*)C))->_storage/*0*/,(((T41*)C))->_capacity/*4*/,_new_capacity);
  621. C->_capacity=_new_capacity;
  622. C->_upper=((((T41*)C))->_upper/*8*/)+(1);
  623. }
  624. /*FI*//*[IRF3.5put*/((((T41*)C))->_storage/*0*/)[(((T41*)C))->_upper/*8*/]=(a1);
  625. /*]*/
  626. }
  627. /*No:FIXED_ARRAY[INTEGER].clear_all*/
  628. /*No:FIXED_ARRAY[INTEGER].set_all_with*/
  629. void r226make(T226* C,int a1){
  630. /*IF*/if ((a1)==(0)) {
  631. C->_upper=-(1);
  632. }
  633.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  634. C->_storage=calloc(a1,sizeof(int));
  635. C->_capacity=a1;
  636. C->_upper=(a1)-(1);
  637. }
  638.  else if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  639. C->_storage=calloc(a1,sizeof(int));
  640. C->_capacity=a1;
  641. C->_upper=(a1)-(1);
  642. }
  643. else {
  644. C->_upper=(a1)-(1);
  645. /*[IRF3.6clear_all*/{T226* C1=C;
  646. int __value=0;
  647. /*[IRF3.6set_all_with*/{T226* C2=C1;
  648. int c1=__value;
  649. r686set_all_with((((T226*)C2))->_storage/*0*/,c1,(((T226*)C2))->_upper/*8*/);
  650. }/*]*/
  651. }/*]*/
  652. }
  653. /*FI*/}
  654. int r226fast_has(T226* C,int a1){
  655. int R=0;
  656. /*IF*/if ((/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  657. R=(r226fast_index_of(C,a1))<=((((T226*)C))->_upper/*8*/);
  658. }
  659. /*FI*/return R;
  660. }
  661. /*No:FIXED_ARRAY[INTEGER].item*/
  662. /*No:FIXED_ARRAY[INTEGER].storage*/
  663. /*No:FIXED_ARRAY[INTEGER].capacity*/
  664. void r226copy(T226* C,T0* a1){
  665. int _new_capacity=0;
  666. int _other_upper=0;
  667. _other_upper=(((T226*)((T226*)a1)))->_upper/*8*/;
  668. /*IF*/if ((_other_upper)>=(0)) {
  669. _new_capacity=(_other_upper)+(1);
  670. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
  671. C->_capacity=_new_capacity;
  672. C->_storage=calloc(_new_capacity,sizeof(int));
  673. }
  674.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  675. r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  676. }
  677. /*FI*/r686copy_from((((T226*)C))->_storage/*0*/,(((T226*)((T226*)a1)))->_storage/*0*/,_other_upper);
  678. }
  679.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  680. r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  681. }
  682. /*FI*/C->_upper=_other_upper;
  683. }
  684. void r226with_capacity(T226* C,int a1){
  685. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  686. C->_storage=calloc(a1,sizeof(int));
  687. C->_capacity=a1;
  688. }
  689. /*FI*/C->_upper=-(1);
  690. }
  691. int r226fast_index_of(T226* C,int a1){
  692. int R=0;
  693. R=r686fast_index_of((((T226*)C))->_storage/*0*/,a1,(((T226*)C))->_upper/*8*/);
  694. return R;
  695. }
  696. /*No:FIXED_ARRAY[INTEGER].put*/
  697. /*No:FIXED_ARRAY[INTEGER].upper*/
  698. /*No:FIXED_ARRAY[INTEGER].count*/
  699. void r226add_last(T226* C,int a1){
  700. int _new_capacity=0;
  701. /*IF*/if ((((((T226*)C))->_upper/*8*/)+(1))<=(((((T226*)C))->_capacity/*4*/)-(1))) {
  702. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  703. }
  704.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  705. C->_storage=calloc(2,sizeof(int));
  706. C->_capacity=2;
  707. C->_upper=0;
  708. }
  709. else {
  710. _new_capacity=(2)*((((T226*)C))->_capacity/*4*/);
  711. C->_storage=r686realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
  712. C->_capacity=_new_capacity;
  713. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  714. }
  715. /*FI*//*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[(((T226*)C))->_upper/*8*/]=(a1);
  716. /*]*/
  717. }
  718.  
  719.